package com.kzw.oa.exam.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import com.kzw.misc.annotation.S;
import com.kzw.misc.annotation.T;
import com.kzw.oa.system.model.Dictionary;

/**
 * 试题库：题目
 */
@Entity
@Table(name = "exam_question")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Question {

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long oid;

	@T("题目内容")
	@Column(length = 1000)
	private String content;

	@S
	@T("标签") // 同种题目，随机抽取
	@Column(length = 30)
	private String tag;

	// 题目类型
	// 难易程度

	// 课程科目
	@ManyToOne
	@JoinColumn(name = "course_type")
	private Dictionary courseType;

	public Long getOid() {
		return oid;
	}

	public void setOid(Long oid) {
		this.oid = oid;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getTag() {
		return tag;
	}

	public void setTag(String tag) {
		this.tag = tag;
	}

	public Dictionary getCourseType() {
		return courseType;
	}

	public void setCourseType(Dictionary courseType) {
		this.courseType = courseType;
	}

}
